import * as types from '../actions/actionTypes';

const initialState = {
    bannerList: [],
    city : {},
    navList : [],   //圆菜单

};

let homepageReducer = (state = initialState, action) => {

     switch(action.type)
     {
        case types.FETCH_BANNER_LIST :
            return {
                 ...state,
            }
        case types.RECEIVE_BANNER_LIST :
            return Object.assign({}, state, {
                bannerList: action.bannerList,
            })
        case types.FETCH_CITY_INFO :
            return {
                 ...state,
            }
        case types.RECEIVE_CITY_INFO :
            return Object.assign({}, state, {
                city: action.city,
            })
         default : 
             return state;
     }
}

export default homepageReducer;